home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.3 (Developer)…68k, x86, SPARC, PA-RISC] / NeXTSTEP 3.3 Dev Intel.iso / usr / sybase / doc / dbretstatus.man < prev    next >
Text File  |  1993-04-22  |  3KB  |  89 lines

  1.  
  2.   1                       Version 4.0 -- 5/1/89              dbretstatus
  3.   ______________________________________________________________________
  4.  
  5.   NAME:  dbretstatus
  6.  
  7.   FUNCTION:
  8.        Determine the stored procedure  status  number  returned  by  the
  9.        current command or remote procedure call.
  10.  
  11.   SYNTAX:
  12.        DBINT dbretstatus(dbproc)
  13.  
  14.        DBPROCESS *dbproc;
  15.  
  16.   COMMENTS:
  17.  
  18.  
  19.  
  20.  
  21.  
  22.  
  23.  
  24.   dbretstatus             Version 4.0 -- 5/1/89                        2
  25.   ______________________________________________________________________
  26.  
  27.        o dbretstatus() fetches a stored procedure's status number.   All
  28.          stored  procedures  that are run on a SQL Server version 4.0 or
  29.          above return a status number.  Stored procedures that  complete
  30.          normally  return  a  status  number of 0.  For a list of return
  31.          status numbers, see the Commands Reference.
  32.        o The  dbhasretstat()  routine  determines  whether  the  current
  33.          Transact-SQL  command  or  remote  procedure call actually gen-
  34.          erated a return status number.   Since  status  numbers  are  a
  35.          feature  of  stored procedures, only a remote procedure call or
  36.          an EXECUTE command can generate a status number.
  37.  
  38.        o When executing a  stored  procedure,  the  server  returns  the
  39.          status  number  immediately  after returning all other results.
  40.          Therefore, the application can call  dbretstatus()  only  after
  41.          processing   the   stored   procedure's   results   by  calling
  42.          dbresults(), as well as dbnextrow() if appropriate.  (Note that
  43.          a stored procedure can generate several sets of results-one for
  44.  
  45.  
  46.   3                       Version 4.0 -- 5/1/89              dbretstatus
  47.   ______________________________________________________________________
  48.          each SELECT it  contains.   Before  the  application  can  call
  49.          dbretstatus()  or  dbhasretstat(), it must call dbresults() and
  50.          dbnextrow() as many times  as  necessary  to  process  all  the
  51.          results.)
  52.  
  53.        o The order in which the application processes the status  number
  54.          and any return parameter values is unimportant.
  55.        o For an example of this routine, see Example 8 in the DB-Library
  56.          Reference Supplement.
  57.  
  58.   PARAMETERS:
  59.        dbproc -  A pointer to the DBPROCESS structure that provides  the
  60.            connection for a particular front-end/SQL Server process.  It
  61.            contains all the information that DB-Library uses  to  manage
  62.            communications and data between the front end and SQL Server.
  63.  
  64.   RETURNS:
  65.  
  66.  
  67.  
  68.   dbretstatus             Version 4.0 -- 5/1/89                        4
  69.   ______________________________________________________________________
  70.        The return status number for the current command.
  71.  
  72.   SEE ALSO:
  73.        dbhasretstat,   dbnextrow,   dbresults,   dbretdata,   dbrpcinit,
  74.        dbrpcparam, dbrpcsend
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.  
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.